package com.jml.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.jml.entity.MemberEntity;
import com.jml.mapper.UserMapper;


@RestController
public class MemberController {
    @Autowired
    private UserMapper userMapper;

    /**
     * cacheNames：<br>
     * key：<br?>
     *
     * @return
     */
    @Cacheable(cacheNames = "members", key = "'getListMembers'")
    @RequestMapping("/getListMembers")
    public List<MemberEntity> getListMembers() {
        return userMapper.findMemberAll();
    }
  //
}
